﻿//////////////////////////////////////////////////////////////////////////////
//
// Copyright © 1998-2024 Glodon Company Limited.
//
// Licensed under the MIT License
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the “Software”),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
//////////////////////////////////////////////////////////////////////////////
#pragma once
#include "GcmpGuiMainFrame.h"
#include "IEventArgs.h"


namespace gcmp
{ 
    class IUiView;

    /// \brief UiViewEventType 定义视图类事件类型。
    enum class UiViewLayoutEventType : int32_t
    {
        ApplyOrCancelWidgetShow,  ///< 应用取消按钮显示发此事件。
        ApplyOrCancelWidgetHide,  ///< 应用取消按钮隐藏发此事件。
    };

    /// \brief 视图类事件参数的接口。
    class IUiViewLayoutEventArgs : public IEventArgs
    {
        DEFINE_CAST_DERIVED(gcmp::IUiViewLayoutEventArgs, gcmp::IEventArgs)

    public:
        /// \brief 获取视图类事件类型。
        /// 
        /// \return 返回视图类事件类型。
        virtual UiViewLayoutEventType GetType() const = 0;

        /// \brief 获取视图对象指针。
        /// 
        /// \return 返回视图对象指针。
        virtual IUiView* GetUiView() = 0;

        /// \brief 获取发送控件。
        /// 
        /// \return 返回发送控件。
        virtual UInt64 GetWidgetId() const = 0;

    };

}

